import request from '@/utils/request'

export function select (params,query) {
  return request({
    url: '/user/info/list?page='+query.pageNum+"&size="+query.pageSize,
    method: 'post',
    data:params
  })
}


export function insert (params) {
  return request({
    url: '/user/info/add',
    method: 'post',
    data:params
  })
}

export function update (params) {
  return request({
    url: '/user/info/update',
    method: 'post',
    data:params
  })
}

export function del (params) {
  return request({
    url: '/user/info/delete',
    method: 'post',
    data:params
  })
}

export function detail(id) {
  return request({
    url: '/user/info/detail',
    method: 'post',
    params:{id: id}
  })
}

export function restPwd(id,pwd) {
  return request({
    url: '/user/info/restPwd',
    method: 'post',
    params:{
      id: id,
      pwd: pwd
    }
  })
}

export function setRole(uId,roleId) {
  return request({
    url: '/user/info/setRole',
    method: 'post',
    params:{
      uId: uId,
      roleId: roleId
    }
  })
}
